//
//  UploadItem.h
//  iFlickr
//
//  Created by 张 霄鹤 on 09-5-17.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Foundation/NSCoder.h>

#define US_NEEDUPLOAD 1
#define US_UPLOADING  2
#define US_UPLOADED   3
#define US_ERROR      4


@interface UploadItem : NSObject {
	NSString *title;
	NSString *description;
	BOOL isPublic;
	BOOL isFriend;
	BOOL isFamily;
	NSString *tags;
	
	UIImage *image;
	
	/**
	 * 上传状态
	 */
	NSInteger uploadState;
	
	/**
	 * 图像上传后获取到的id
	 */
	NSString *photoid;
}

@property(nonatomic,retain) NSString *title;
@property(nonatomic,retain) NSString *description;
@property(nonatomic) BOOL isPublic;
@property(nonatomic) BOOL isFriend;
@property(nonatomic) BOOL isFamily;
@property(nonatomic,retain) NSString *tags;
@property(nonatomic) NSInteger uploadState;
@property(nonatomic,retain) UIImage *image;
@property(nonatomic,retain) NSString *photoid;

/**
 * 初始化，设定内容
 */
-(id)init;

/**
 * 反序列化
 */
- (id)initWithCoder:(NSCoder *)decoder;

/**
 * 序列化
 */
- (void)encodeWithCoder:(NSCoder *)encoder;

-(NSData *)getImageData;

-(NSDictionary *)getItemInfo;

/**
 * 有多少项可以修改，用于 UITableView中显示 Cell个数
 */
-(NSInteger)numberOfCanModify;

/**
 * 获取相应项目的标题，名称
 */
-(NSString *)getCellTitle:(NSInteger)index;

@end
